projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e883df
)
xend: Fix 20825:49a2c1069e14
author
Keir Fraser
<keir.fraser@citrix.com>
Wed, 20 Jan 2010 09:51:38 +0000
(09:51 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Wed, 20 Jan 2010 09:51:38 +0000
(09:51 +0000)
Converting an Python Int, sizeof(long) already returns byte length
rather than bit length so do not divide-by-8.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/python/xen/lowlevel/xc/xc.c
patch
|
blob
|
history
diff --git
a/tools/python/xen/lowlevel/xc/xc.c
b/tools/python/xen/lowlevel/xc/xc.c
index 996e1b4ae298fb897b061d1d0343799cd5703f6b..1932758090b68f3dfa046b056b9341532fdf4bb6 100644
(file)
--- a/
tools/python/xen/lowlevel/xc/xc.c
+++ b/
tools/python/xen/lowlevel/xc/xc.c
@@
-933,7
+933,7
@@
static PyObject *pyxc_hvm_build(XcObject *self,
if ( PyInt_Check(vcpu_avail_handle) )
{
unsigned long v = PyInt_AsLong(vcpu_avail_handle);
- for ( i = 0; i < sizeof(long)
/8
; i++ )
+ for ( i = 0; i < sizeof(long); i++ )
vcpu_avail[i] = (uint8_t)(v>>(i*8));
}
else if ( PyLong_Check(vcpu_avail_handle) )